<?php
require_once dirname(dirname(__DIR__))."/common.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\model\Topic;

$video_uuid=$_REQUEST['video_uuid'];
$id=$_REQUEST['id'];
if(empty($video_uuid) || empty($id)){
    Response::output(-1,"参数错误");
}
//实例化数据库
$db = SysResource::getDB(false);
$Topic = new Topic($db);
//根据话题id，查询话题分类
$video_detail=$Topic->video_details($video_uuid,$id);

if(!empty($video_detail)){
    if(empty($video_detail['share_pic'])){
        $video_detail['share_pic']="";
    }
    if(empty($video_detail['video_desc'])){
        $video_detail['video_desc']="";
    }
    Response::output(0,"查询成功",$video_detail);
}else{
    Response::output(0,"查询成功",[]);
}

